<%@page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<form:form modelAttribute="page" id="pagerForm" method="post"
	action="${ctx}/user/list?navtabid=${navtabid}">
	<input type="hidden" name="pageNo" value="${page.pageNo}" />
	<input type="hidden" id="numPerPage" name="numPerPage"
		value="${page.numPerPage}" />
	<input type="hidden" name="orderBy" value="${page.orderBy}" />
	<input type="hidden" name="order" value="${page.order}" />
	<input type="hidden" name="name" value="${user.name}" />
	<input type="hidden" name="id" value="${user.id}" />
</form:form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="${ctx}/user/list?navtabid=${navtabid}"
		method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>用户名：<input type="text" name="name" value="${user.name}" />
					</td>
					<td>用户id：<input type="text" name="id" value="${user.id}" />
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">检索</button>
							</div>
						</div></li>
					<li><a class="button" href="${ctx}/user/advancedSearch?navtabid=${navtabid}" target="dialog"
						mask="true" title="查询框"><span>高级检索</span></a></li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${ctx}/user/add?navtabid=${navtabid}" target="dialog"><span>添加用户</span></a></li>
			<li><a class="delete" href="${ctx}/user/delete/{select_id}"
				target="ajaxTodo" title="确定要删除吗?"><span>删除用户</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="${ctx}/user/exportPDF"  target="dwzExport" targetType="navTab"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="40"><input type="checkbox" class="checkboxCtrl"
					group="c1" /></th>
				<th orderField="name"
					class="${page.orderBy eq 'name' ? page.order : ''}" width="100">用户名</th>
				<th width="80">密码</th>
				<th width="100">时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${page.result}" varStatus="menu">
				<tr target="select_id" rel="${item.id}">
					<td><input type="checkbox" name="c1" value="${item.id}" /></td>
					<td>${item.name}</td>
					<td>${item.password}</td>
					<td><fmt:formatDate pattern="yyyy-MM-dd" value="${item.createDate}"/></td>
					<td>
					<a  class="btnDel" href="${ctx}/user/delete/${item.id}"
						target="ajaxTodo" title="确定要删除吗?"  >删除用户</a>
					<a  class="btnEdit" href="${ctx}/user/edit/${item.id}?navtabid=${navtabid}"
						target="dialog" title="修改">修改</a>
					<a   href="${ctx}/rolemenu/userrole/${item.id}?navtabid=${navtabid}"
						target="dialog" title="用户对应角色">用户对应角色</a>
						
					<a   href="${ctx}/user/changepassword/${item.id}?navtabid=${navtabid}"
						target="ajaxTodo" title="确定重置密码">发送邮件</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<%@ include file="/commons/panelBar.jsp"%>
</div>
